package com.ece.friendly.service;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ece.friendly.dao.AlerteDao;
import com.ece.friendly.model.Alerte;
import com.ece.friendly.model.Repondre;

@Service
public class AlerteServiceImp implements AlerteService{

	@Autowired
	private AlerteDao alerteDao;
	@Override
	public boolean addAlerte(String comment, String subject,String looker,long date) {
		return alerteDao.addAlerte(comment, subject,looker, date);
	}
	@Override
	public List<Alerte> getLastAlert(int limit) {
		return alerteDao.getLastAlert(limit);
	}
	@Override
	public ArrayList<ArrayList<Object>> getAlertes(String login) {
		return alerteDao.getAlertes(login);
	}
	@Override
	public ArrayList<ArrayList<Object>> getAllAlertes() {
		return alerteDao.getAllAlertes();
	}
	@Override
	public boolean repondreAlerte(String comment) {
		// TODO Auto-generated method stub
		return false;
	}
	@Override
	public Alerte getAlerte(int id) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public ArrayList<Object> getAlerte(String looker, long date) {
		return alerteDao.getAlerte(looker, date);
	}
	@Override
	public boolean repondre(String comment, int alerte, String stylie,long date) {
		return alerteDao.repondre(comment, alerte, stylie, date);
	}
	@Override
	public Repondre getRepondre(int alerte, long date) {
		return alerteDao.getRepondre(alerte, date);
	}

}
